home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / OS / FWODMisc / SLSUSink.xh < prev    next >
Encoding:
Text File  |  1996-09-16  |  5.2 KB  |  212 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: SLSUSink.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  *  ----- Our Includes
  12.  */
  13.  
  14.  
  15. #ifndef SOM_FW_OStorageUnitSink_xh
  16. #define SOM_FW_OStorageUnitSink_xh
  17.  
  18. class FW_OStorageUnitSink;
  19.  
  20. #define FW_OStorageUnitSink_MajorVersion 1
  21. #define FW_OStorageUnitSink_MinorVersion 0
  22.  
  23. /*
  24.  * Passthru lines: File: "C.xh", "before"
  25.  */
  26.  
  27.  
  28. /* C++ SOM defs */
  29. #include <somcls.xh>
  30. #include <somcm.xh>
  31.  
  32. /* C++ parent defs */
  33. #ifndef SOM_FW_ORandomAccessSink_xh
  34. #include <SLRanSin.xh>
  35. #endif
  36.  
  37. #ifndef FW_OStorageUnitSink_API
  38. #define FW_OStorageUnitSink_API
  39. /*
  40.  * -- The Class API
  41.  */
  42.  
  43. /*
  44.  * Start of user-defined types:
  45.  */
  46. class SOMClass;
  47. class SOMObject;
  48. class FW_OSink;
  49. class FW_ORandomAccessSink;
  50. class ODFrame;
  51. class ODFacet;
  52. class ODObject;
  53. class ODExtension;
  54. class ODRefCntObject;
  55. class ODStorageUnit;
  56. class ODDraft;
  57. class ODSession;
  58. class ODPart;
  59. class ODStorageUnitCursor;
  60. class ODStorageUnitView;
  61. class ODStorageUnitRefIterator;
  62. class FW_OStorageUnitSink;
  63.  
  64. /*
  65.  * End of user-defined types.
  66.  */
  67.  
  68. #ifdef OLDIBMSOMAPISUPPORT
  69. #define FW_OStorageUnitSinkCClassData FW_OStorageUnitSinkClassData
  70. #define FW_OStorageUnitSinkNewClass(major,minor) somNewVersionedClassReference(FW_OStorageUnitSink,major,minor)
  71. #endif
  72.  
  73. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  74. #define FW_OStorageUnitSinkMetaClass SOMClass
  75.  
  76. #if PRAGMA_ALIGN_SUPPORTED
  77. #  pragma options align=power
  78. #endif
  79.  
  80. /* The API to the FW_OStorageUnitSink class object, and the methods it introduces. */
  81. SOMEXTERN struct FW_OStorageUnitSinkClassDataStructure {
  82. #ifdef OLDIBMSOMAPISUPPORT
  83.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  84. #else
  85.     long zero;
  86. #endif
  87.     somStaticClassInfo *sci;
  88.     somDToken        instanceDataToken;
  89.     long reserved [3];
  90.     somMToken InitFromStorageUnitView;
  91.     somMToken InitFromStorageUnitAndProperty;
  92.     somMToken GetStorageUnitView;
  93. } SOMDLINK FW_OStorageUnitSinkClassData;
  94.  
  95. #if PRAGMA_ALIGN_SUPPORTED
  96. #  pragma options align=reset
  97. #endif
  98.  
  99. #if !defined(FW_OStorageUnitSink_Class_Source) && !defined(SOM_Module_slsusink_Source)
  100. #if PRAGMA_IMPORT_SUPPORTED
  101. #pragma import list FW_OStorageUnitSinkClassData
  102. #endif
  103. #endif
  104.  
  105.  
  106. /*
  107.  * -- Typedefs and inline method declarations for left path inherited methods
  108.  * -- are omitted because this compilation had -museinheritedmethods in effect
  109.  */
  110.  
  111.  
  112. /*
  113.  * -- Typedefs for FW_OStorageUnitSink Method Procedures
  114.  */
  115. SOMEXTERN {
  116. typedef void   (* SOMLINK somTD_FW_OStorageUnitSink_InitFromStorageUnitView)(FW_OStorageUnitSink *somSelf, Environment *ev,
  117.         ODStorageUnitView* storageUnitView);
  118. typedef void   (* SOMLINK somTD_FW_OStorageUnitSink_InitFromStorageUnitAndProperty)(FW_OStorageUnitSink *somSelf, Environment *ev,
  119.         ODStorageUnit* storageUnit,
  120.         ODPropertyName propertyName,
  121.         ODValueType valueType);
  122. typedef ODStorageUnitView*   (* SOMLINK somTD_FW_OStorageUnitSink_GetStorageUnitView)(FW_OStorageUnitSink *somSelf, Environment *ev);
  123. }
  124.  
  125. #endif /* FW_OStorageUnitSink_API */
  126.  
  127.  
  128. /*
  129.  * -- This emitter treats Method Tokens as Thunks by default.
  130.  * -- Use the sc modifier "nothunks" to change this default
  131.  */
  132. #undef somresolve_
  133. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  134.  
  135. /*
  136.  * -- The C++ Wrapper Class for FW_OStorageUnitSink
  137.  */
  138. class FW_OStorageUnitSink : public FW_ORandomAccessSink
  139. {
  140. public:
  141.  
  142. // FW_OStorageUnitSink::new registers use of the class object, and then uses somNew
  143. // to allocate memory and load the object method table pointer. 
  144. void *operator new(size_t size)
  145. {
  146.     SOM_IgnoreWarning(size);
  147.     // Allocate memory using the default allocator for FW_OStorageUnitSink, and
  148.     // clear mem & set method table pointer, call basic initialization
  149. #ifdef SOMCHKNULL
  150.     void * __somResult = (void *)
  151.       somNewObject(FW_OStorageUnitSink);
  152.     SOMCHKNULL(__somResult);
  153.     return __somResult;
  154. #else
  155.     return (void*) somNewObject(FW_OStorageUnitSink);
  156. #endif
  157. }
  158.  
  159. // FW_OStorageUnitSink::delete uses the default deallocator for the object's class.
  160. void operator delete(void * obj)
  161. {
  162.     if (obj) {
  163.         SOM_Resolve(obj,SOMObject,somFree)
  164.            ( (SOMObject*) obj );
  165.     }
  166. }
  167.  
  168. /* method: InitFromStorageUnitView */
  169. void   InitFromStorageUnitView(Environment *ev,
  170.         ODStorageUnitView* storageUnitView)
  171. {
  172.    SOM_ResolveD(this,FW_OStorageUnitSink,FW_OStorageUnitSink,InitFromStorageUnitView)
  173.     (this,ev,storageUnitView);
  174. #ifdef SOMCHKEXCEPT
  175.       SOMCHKEXCEPT;
  176. #endif
  177. }
  178.  
  179. /* method: InitFromStorageUnitAndProperty */
  180. void   InitFromStorageUnitAndProperty(Environment *ev,
  181.         ODStorageUnit* storageUnit,
  182.         ODPropertyName propertyName,
  183.         ODValueType valueType)
  184. {
  185.    SOM_ResolveD(this,FW_OStorageUnitSink,FW_OStorageUnitSink,InitFromStorageUnitAndProperty)
  186.     (this,ev,storageUnit,propertyName,valueType);
  187. #ifdef SOMCHKEXCEPT
  188.       SOMCHKEXCEPT;
  189. #endif
  190. }
  191.  
  192. /* method: GetStorageUnitView */
  193. ODStorageUnitView*   GetStorageUnitView(Environment *ev)
  194. {
  195.    #ifdef SOMCHKEXCEPT
  196.    ODStorageUnitView* __somResult = 
  197.       SOM_ResolveD(this,FW_OStorageUnitSink,FW_OStorageUnitSink,GetStorageUnitView)
  198.     (this,ev);
  199.       SOMCHKEXCEPT;
  200.    return __somResult;
  201. #else
  202.    return SOM_ResolveD(this,FW_OStorageUnitSink,FW_OStorageUnitSink,GetStorageUnitView)
  203.     (this,ev);
  204. #endif
  205. }
  206.  
  207. };   /* FW_OStorageUnitSink */
  208.  
  209.  
  210.  
  211. #endif       /* SOM_FW_OStorageUnitSink_xh */
  212.